home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 5791-.end / dmg-6260 / articles / drivlite.doc < prev    next >
Text File  |  1993-06-23  |  2KB  |  60 lines

  1.                         FLASHING THE DRIVE LIGHT
  2.                        ~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. If you are an ardent demo-watcher,  you  may have seen some demos which
  5. flash the drive light to the beat  of  the music. And you may have also
  6. thought, how the hell did  they  do  that?  Well,  the method is really
  7. quite simple...
  8.  
  9. An address in memory, $FF8802 contains the current drive light status.
  10.  
  11. P=PEEK($FF8802)
  12.  
  13. if P=102, then both lights are off.
  14. if P=104, then both lights are on.
  15. if P=106, then only drive B is on.
  16. if P=108, then only drive A is on.
  17.  
  18. When I say "both lights  are  off",  I  mean  drive  A and B. There are
  19. probably values which affect the modem as well,  but as I do not have a
  20. modem, I cannot tell. If you want to check for other values, simply run
  21. this little program:
  22.  
  23. 10 for T=0 to 255
  24. 20 print T
  25. 30 poke $FF8802,T
  26. 40 wait key
  27. 50 next T
  28.  
  29. Jot down the values which give the best results.
  30.  
  31. If you want to incorporate drive lights  which flash to the music, then
  32. there is a  little  something  which  you  have  to  do  first. Try the
  33. following program:
  34.  
  35. 10 rem THIS PROGRAM NEEDS SOME MAD MAX MUSIC IN BANK 3
  36. 15 :
  37. 20 dreg(0)=1 : call 3 : loke $4d2,start(3)+8
  38. 30 repeat
  39. 40 p=psg(8)
  40. 50 if p=15 then poke $ff8802,108 else poke $ff8802,102
  41. 60 i$=inkey$ : until i$=" "
  42. 70 loke $4d2,0 : silence
  43. 80 rem Remove 'silence' if you do not have the MISTY EXTENSION
  44.  
  45. When you run it, the program does not  flash the lights at all. This is
  46. something to do with the PSG  $FF8800  not  sorting out the contents of
  47. it's address (or something -  Help  me  Billy!)  So,  to get the lights
  48. working, insert the following line:
  49.  
  50. 45 poke $ff8800,14
  51.  
  52. This should now be OK. Check out  DRIVLITE.BAS on this disk to see what
  53. effects can  be  achieved  with  this  function.  To  the  best  of  my
  54. knowledge, flashing the drive lights  on  and  off  does not affect the
  55. drive or disk in any way, so don't worry.
  56.  
  57. Great thanks go to Wheee the Fibble for this chunk of code!
  58.  
  59. Article: BLACK EAGLE 23/6/93
  60.